﻿<Application 
    x:Class="ApplicationBarSample.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:appbar="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    >

    <!--Application Resources-->
    <Application.Resources>        
        <appbar:ApplicationBar x:Key="GlobalAppMenuBar" Opacity="1" IsVisible="True" IsMenuEnabled="True">
            <appbar:ApplicationBar.Buttons>
                <appbar:ApplicationBarIconButton IconUri="/Images/appbar.add.rest.png" Text="add">
                </appbar:ApplicationBarIconButton>
                <appbar:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="save">
                </appbar:ApplicationBarIconButton>
                <appbar:ApplicationBarIconButton IconUri="/Images/appbar.delete.rest.png" Text="delete">
                </appbar:ApplicationBarIconButton>
            </appbar:ApplicationBar.Buttons>
            <appbar:ApplicationBar.MenuItems>
                <appbar:ApplicationBarMenuItem Text="Menu Item 1" IsEnabled="True">
                </appbar:ApplicationBarMenuItem>
                <appbar:ApplicationBarMenuItem Text="Menu Item 2" IsEnabled="True">
                </appbar:ApplicationBarMenuItem>
            </appbar:ApplicationBar.MenuItems>
        </appbar:ApplicationBar>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>
